#ifndef VEC3_H
#define VEC3_H

#include <d3dx10math.h>
#include <list>

//--------Vec3-------
class Vec3 : public D3DXVECTOR3
{
public:

	Vec3() : D3DXVECTOR3() { }
	Vec3(D3DXVECTOR3 &v3) { x = v3.x; y = v3.y; z = v3.z; }
	Vec3(const float _x, const float _y, const float _z) { x=_x; y=_y; z=_z; }
	inline Vec3(const class Vec4 &v4);	
	
	inline float Length() { return D3DXVec3Length(this); }
	inline Vec3 *Normalize() { return static_cast<Vec3 *>(D3DXVec3Normalize(this, this)); }
	inline float Dot(const Vec3 &b) { return D3DXVec3Dot(this, &b); }
	inline Vec3 Cross(const Vec3 &b) const;
};

typedef std::list<Vec3> Vec3List; 

inline Vec3 Vec3::Cross(const Vec3 &b) const
{
	Vec3 out;
	D3DXVec3Cross(&out, this, &b);
	return out;
}

#endif